import request from '@/utils/request'

// 查询处罚决定书列表
export function listPenaltydecisions(query) {
  return request({
    url: '/ruoyi-system/penaltydecisions/list',
    method: 'get',
    params: query,
  })
}

// 查询处罚决定书详细
export function getPenaltydecisions(id) {
  return request({
    url: '/ruoyi-system/penaltydecisions/' + id,
    method: 'get',
  })
}

// 新增处罚决定书
export function addPenaltydecisions(data) {
  return request({
    url: '/ruoyi-system/penaltydecisions',
    method: 'post',
    data: data,
  })
}

// 修改处罚决定书
export function updatePenaltydecisions(data) {
  return request({
    url: '/ruoyi-system/penaltydecisions',
    method: 'put',
    data: data,
  })
}

// 删除处罚决定书
export function delPenaltydecisions(id) {
  return request({
    url: '/ruoyi-system/penaltydecisions/' + id,
    method: 'delete',
  })
}

// 预览
export function previewPenaltydecisions(id) {
  return request({
    url: '/ruoyi-system/penaltydecisions/preview?id=' + id,
    method: 'get',
  })
}

// 详情预览
export function previewInquiryPdf(data) {
  return request({
    url: '/ruoyi-system/penaltydecisions/pdfPreview',
    method: 'post',
    data,
  })
}

// 上传附件
export function addPenaltydecisionsFiles(data) {
  return request({
    url: '/ruoyi-system/penaltydecisions/addFiles',
    method: 'post',
    data: data,
  })
}

// 立案号下拉数据
export function getCaseList(data) {
  return request({
    url: '/ruoyi-system/penaltydecisions/caseList',
    method: 'get',
  })
}

// 导出处罚决定书
export function exportPenaltydecisions(data) {
  return request({
    url: '/ruoyi-system/penaltydecisions/export',
    method: 'post',
    data: data,
    responseType: 'blob',
  })
}
